<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>用户管理</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="easyui/css/easyui.css">
		<link rel="stylesheet" type="text/css" href="easyui/css/icon.css">
		<link rel="stylesheet" type="text/css" href="easyui/css/demo.css">
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="easyui/js/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="easyui/js/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="administrator/js/user_manage.js"></script>

	</head>

	<body>
		<div id="lay" class="easyui-layout"	style="height:500px">
			<div data-options="region:'north',collapsed:true" title="用户查询"  style="height: 120px;">
				<form id="searchFrom" method="post">
					<div>
						<table>
							<tr>
								<td>
									用户编号：
								</td>
								<td>
									<input name="employNo" type="text">
								</td>
								<td>
									用户名：
								</td>
								<td>
									<input name="employName" type="text">
								</td>							
							</tr>
							<tr>
								<td>
								创建时间从:
								</td>
								<td>
									<input name="timeForm" class="easyui-datetimebox"
										data-options="formatter:myformatter,parser:myparser,editable:false">
								</td>
								<td>
									到:
								</td>
								<td>
									<input name="timeTo" class="easyui-datetimebox"
										data-options="formatter:myformatter,parser:myparser,editable:false">
								</td>
							</tr>
						</table>
					</div>

					<div align="right">
						<a id="searchbtn" class="easyui-linkbutton"
							data-options="iconCls:'icon-search',plain:true"
							onclick="searchUser()">查询</a>
						<a id="clearbtn" class="easyui-linkbutton"
							data-options="iconCls:'icon-clear',plain:true"
							onclick="clearForm()">清空</a>
					</div>
				</form>
			</div>
			<div data-options="region:'center'" >
				<table id="dg" title="用户信息">
					<thead>
						<tr>
							<th data-options="field:'id',checkbox:true" style="width:10">

							</th>
							<th data-options="field:'employNo'" style="width:10">
								用户编号
							</th>
							<th data-options="field:'employName'" style="width:10">
								用户名
							</th>
							<th data-options="field:'password'" style="width:10">
								密码
							</th>
							<th data-options="field:'sex'" style="width:10">
								性别
							</th>
							<th data-options="field:'birthday'" style="width:10">
								出生日期
							</th>
							<th data-options="field:'telephone'" style="width:10">
								手机号
							</th>
							<th data-options="field:'email'" style="width:20">
								电子邮箱
							</th>
							<th data-options="field:'address'" style="width:20">
								联系地址
							</th>
							<th data-options="field:'deptName'" style="width:10">
								所属部门
							</th>
							<th data-options="field:'positionName'" style="width:10">
								所属职位
							</th>
							<th data-options="field:'photoUrl'" style="width:10">
								头像
							</th>
							<th data-options="field:'createTime'" style="width:10">
								创建时间
							</th>
							
						</tr>
					</thead>
				</table>
			</div>
		</div>
		
		<div id="dt" align="right">
		<a href="javascript:void(0)" class="easyui-linkbutton"
				data-options="iconCls:'icon-add',plain:true"
				onclick="authority()">用户授权</a>
			<a href="javascript:void(0)" class="easyui-linkbutton"
				data-options="iconCls:'icon-search',plain:true"
				onclick="openSearch()">查询</a>
			<a href="javascript:void(0)" class="easyui-linkbutton "
				data-options="iconCls:'icon-add',plain:true" onclick="onAdd()">增加</a>
			<a href="javascript:void(0)" class="easyui-linkbutton"
				data-options="iconCls:'icon-edit',plain:true" onclick="onUpdate()">编辑</a>
			<a href="javascript:void(0)" class="easyui-linkbutton"
				data-options="iconCls:'icon-remove',plain:true" onclick="onDelete()">删除</a>
			<a href="javascript:void(0)" class="easyui-linkbutton"
				data-options="iconCls:'icon-undo',plain:true" onclick="reject()">取消</a>
		</div>

		<!--添加/修改用户弹出框  -->
		<div id="dg_user" class="easyui-dialog" align="center"
			data-options="closed:true,modal:true" style="top:50px;padding:10px; width: 500px;">
			<form id="userForm" name="edit_user" action="" method="post">
				<input type="hidden" name="id" />
				<table>
					<tr>
						<td>
							用户编号:
						</td>
						<td>
							<input type="text" class="easyui-textbox" name="employNo" data-options="required:true,missingMessage:'用户编号必填!'" value="">
						</td>
					</tr>
					<tr>
						<td>
							用户名称:
						</td>
						<td>
							<input type="text" name="employName" class="easyui-textbox" data-options="required:true,missingMessage:'用户名必填!'" value="">
						</td>
					</tr>
					<tr>
						<td>
							用户密码:
						</td>
						<td>
							<input type="text" name="password" class="easyui-textbox" data-options="required:true,missingMessage:'密码必填'" value="">
						</td>
					</tr>
					<tr>
						<td>
							性别:
						</td>
						<td>
							<input type="text" name="sex" class="easyui-textbox" data-options="required:true,missingMessage:'性别必填'" value="">
						</td>
					</tr>
					<tr>
						<td>
							出生日期:
						</td>
						<td>
							<input type="text" name="birthday" class="easyui-datetimebox"
										data-options="formatter:myformatter,parser:myparser,editable:false,required:true,missingMessage:'性别必填'" value="">
						</td>
					</tr>
					<tr>
						<td>
							手机号码:
						</td>
						<td>
							<input type="text" class="easyui-numberbox" name="telephone" value="">
						</td>
					</tr>
					<tr>
						<td>
							电子邮箱:
						</td>
						<td>
							<input type="text" class="easyui-textbox" name="email" data-options="validType:'email'"  value="">
						</td>
					</tr>
					<tr>
						<td>
							联系地址:
						</td>
						<td>
							<input type="text" class="easyui-textbox" name="address" value="">
						</td>
					</tr>
					<tr>
						<td>
							所属部门:
						</td>
						<td>
							<input id="dept" type="text" class="easyui-combobox" name="departmentID" data-options="required:true"  value="">
						</td>
					</tr>
					<tr>
						<td>
							所属职位:
						</td>
						<td>
							<input id="posi" type="text" class="easyui-combobox" name="positionID" data-options="required:true"  value="">
						</td>
					</tr>
					<tr>
						<td>
							<a id="btnsummit" class="easyui-linkbutton">确定</a>
							<a id="btncancer" class="easyui-linkbutton">取消</a>
						</td>
					</tr>

				</table>
			</form>
		</div>
		<div id="userAuthority" class="easyui-dialog" title="用户授权 "
			data-options="closed:true,modal:true" style="width: 500px;">
			<div class="easyui-tabs" style="width: 500px; height: 400px">
				<div title="授权" data-options="iconCls:'icon-help'"
						style="padding: 10px">
							<div style=" height: 93%">
								<ul id = "tt" class="easyui-tree" ></ul>
							</div>
							
							<div style="height:7%">
								<a href="javascript:void(0)" class="easyui-linkbutton lb"
									onclick="getChecked()">授权</a>
							</div>
					</div>
			</div>
		</div>
	</body>
</html>

